package widget;

import javax.swing.*;
import java.awt.*;
import java.util.HashMap;

/**
 * Created by LLAP on 2017/12/14.
 * Copyright (c) 2017 LLAP. All rights reserved.
 */
public class TLabel extends TComponent {

    public TLabel(String text, int direction) {
        super("", new JLabel(text, direction), "", false);
    }
    public TLabel(String text) {
        this(text, SwingConstants.CENTER);
    }

    public void setFont(Font font) {
        ((JLabel)field).setFont(font);
    }

    @Override
    public HashMap<String, Object> getData() throws IllegalArgumentException {
        return null;
    }

    @Override
    public void clear() {}
}
